
import http from "@/utils/http";
import {XG_PATH} from "@/common/const";
let type='0';
let  headers= {
  "Content-Type": "application/json; charset=UTF-8"
};
/**
 * 基础—选股字段数据区间(可视化选股) (tang)
 */
export function queryOption(option){
  const url = `${XG_PATH}/searchserver/api/queryOption/valueRange.htm`;
  const params = {
    ...option,
  };
  return http.get(url,params); 
}
/**
 * 基础—版块 (tang)
 */
export function getblockList(){
  const url = `${XG_PATH}/searchserver/api/queryOption/blockListByInt.htm`;
  const params = {
    blockType: 1021
  };
  return http.get(url,params); 
}
/**
 * 指数列表 (tang)
 */
export function getIndexList(option){
  const url = `${XG_PATH}/searchserver/api/queryOption/indexList.htm`;
  const params = {
    ...option
  };
  return http.get(url, params);
}
/**
 * 选股search (tang)
 */
export function queryJson(option){
  const url = `${XG_PATH}/searchserver/api/search/andOrQueryJson.htm`;
  const params = {
    page: 1,
    pageSize: 200,
    ...option
  };
  const data = JSON.stringify(params);
  return http.post(url, data,false,headers,type);
}